package com.fr.report.semantic;

import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import java.io.Serializable;

public class IndexSummary
  implements XMLReadable, Serializable, Cloneable
{
  private int index;
  private int functionIndex;

  public IndexSummary()
  {
    this(0);
  }

  public IndexSummary(int paramInt)
  {
    this(paramInt, 1);
  }

  public IndexSummary(int paramInt1, int paramInt2)
  {
    this.functionIndex = 1;
    this.index = paramInt1;
    this.functionIndex = paramInt2;
  }

  public int getIndex()
  {
    return this.index;
  }

  public void setIndex(int paramInt)
  {
    this.index = paramInt;
  }

  public int getFunctionIndex()
  {
    return this.functionIndex;
  }

  public void setFunctionIndex(int paramInt)
  {
    this.functionIndex = paramInt;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if ((paramXMLableReader.isChildNode()) && ("IndexSummaryAttr".equals(paramXMLableReader.getTagName())))
    {
      String str;
      if ((str = paramXMLableReader.getAttr("index")) != null)
        setIndex(Integer.parseInt(str));
      if ((str = paramXMLableReader.getAttr("functionIndex")) != null)
        setFunctionIndex(Integer.parseInt(str));
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("IndexSummaryAttr").attr("index", getIndex()).attr("functionIndex", getFunctionIndex()).end();
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}